Repository navigation
runtime: native-payload transport core and link tokens (net P0) - #12064
Closed
proggeramlug wants to merge 1 commit into
Closed
proggeramlug wants to merge 1 commit into
proggeramlug wants to merge 1 commit into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Bring net transport P0 (#12064, #11919) onto 8476086. Keep current PayloadVTable, PayloadBuffer support, stream state record, native-this alias and ServerResponse payload ABI; extend that ABI rather than add P0's older duplicate implementation. TransportCore is inline at offset zero of TransportPayload<E>. Tokens carry route/op/cell, terminal driver completions retain the cell, close hands the handle to the driver, and generational handles and resolver ops protect reopen. Link teardown discards completions before heap teardown. Keep id routes for subsystems that have not migrated; add no id/cell alias. Use MaybeUninit words for opaque FFI storage and check its ABI before initialization. Expose binding owner links, lifecycle and typed reopen through the shared cell/vtable. A checked route store preserves the live multishot read. Runtime witnesses cover N1, N5, N6, N7, N9, N10, N11, and the runtime half of N8, with nine sabotages that turn them red. Phase A's ext-net and HTTP connection conversion remains separate work.
proggeramlug
force-pushed
the
net-transport-p0
branch
from
October 8, 2026 22:09
2bf026a to
6439ed3
Compare
proggeramlug
pushed a commit
that referenced
this pull request
Oct 9, 2026
Bring net transport P0 (#12064, #11919) onto 8476086. Keep current PayloadVTable, PayloadBuffer support, stream state record, native-this alias and ServerResponse payload ABI; extend that ABI rather than add P0's older duplicate implementation. TransportCore is inline at offset zero of TransportPayload<E>. Tokens carry route/op/cell, terminal driver completions retain the cell, close hands the handle to the driver, and generational handles and resolver ops protect reopen. Link teardown discards completions before heap teardown. Keep id routes for subsystems that have not migrated; add no id/cell alias. Use MaybeUninit words for opaque FFI storage and check its ABI before initialization. Expose binding owner links, lifecycle and typed reopen through the shared cell/vtable. A checked route store preserves the live multishot read. Runtime witnesses cover N1, N5, N6, N7, N9, N10, N11, and the runtime half of N8, with nine sabotages that turn them red. Phase A's ext-net and HTTP connection conversion remains separate work.
Contributor
Author
|
Superseded by #12267 (P0 plus phase A landed together). Follow-ups are tracked in the netfix fix-forward. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #11919, Refs #11196
Phase P0 of the net transport ownership design. It adds runtime and perry-ffi support for native payloads that own a socket transport, so
perry-ext-netcan drop its id-keyed tables in phase A.TransportCoresits first inTransportPayload<E>.link_event_owner, then to the core, then through a generational handle check. There is no id map.link_ref, so a payload holding a driver handle cannot be swept until the handle'sClosedhas been dispatched.Dropnever reaches the driver.Closedarriving after a reopen delivers only its close event and its unref.js_perry_payload_*andjs_perry_net_link_*, with a layout digest that covers the opaque core block (39 words; 48 on Windows). The net ABI version is now 3.Tests:
Programs, n=3: hello, tsc and Zod produce identical output on both arms. Instructions are within +0.11% / −0.05%, and RSS is within ±1.5 MB.
Not covered: the Windows paths are written but were not compiled on any host. A compile-time size assert guards the core block size.